package comman.duke 
{
	import com.greensock.TweenLite;
	import com.greensock.easing.*;
	import flash.display.Sprite;
	import flash.utils.setTimeout;
	/**
	 * ...
	 * @author jerry.d
	 */
	public class ShowAndHide 
	{
		
		public static function doforme(dis:Sprite):void{
			dis.alpha = 0;
			TweenLite.to(dis, 1, {alpha:1, y:dis.y - 80, onComplete:onPhase1Complete, onCompleteParams:[dis],ease:Elastic.easeInOut});
		}
		
		private static function onPhase1Complete(dis:Sprite):void{
			setTimeout(function():void{
				TweenLite.to(dis, 1, {alpha:0, y:dis.y - 80, onComplete:onPhase2Complete, onCompleteParams:[dis], ease:Elastic.easeInOut});
			}, 1000);
		}
		
		private static function onPhase2Complete(dis:Sprite):void{
			NumDisplay.onTweenComplete(dis);
		}
	}

}